#include<iostream>
using namespace std;
int fun(int n)
{
	int ans = 1;
	for (int i = 1; i <= n; i++)
	{
		ans = ans * i;
	}
	return ans;
}
/*
int main()
{
	int n;
	cin >> n;
	int sum = 0;
	for (int i = 1; i <= n; i++) {
		sum += fun(i);
	}
	cout << sum << endl;
	return 0;
}
*/
int main()
{
	int sum = 0;
	int n;
	cin >> n;
	int ans = 1;
	for (int i = 1; i <= n; i++)
	{
		ans = ans * i;
		sum += ans;
	}
	cout << sum << endl;
	return 0;
}